package main

import ("github.com/garyburd/redigo/redis"
"fmt")


func main()  {
	conn,err := redis.Dial("tcp","192.168.1.203:6379")
	if err != nil {
		fmt.Println("connect redis error :",err)
		return
	}
	defer conn.Close()
	conn.Send("HSET", "student","name", "wd","age","22")
	conn.Send("HSET", "student","Score","100")
	conn.Send("HGET", "student","age")
	conn.Flush()

	res1, err := conn.Receive()
	fmt.Printf("Receive res1:%v \n", res1)
	res2, err := conn.Receive()
	fmt.Printf("Receive res2:%v\n",res2)
	res3, err := conn.Receive()
	fmt.Printf("Receive res3:%s\n",res3)
}//Receive res1:0
//Receive res2:0//Receive res3:22


